package router

import (
	"gin-vue-admin/api/v1"
	"gin-vue-admin/middleware"
	"github.com/gin-gonic/gin"
)

func InitTrainRouter(Router *gin.RouterGroup) {
	TrainRouter := Router.Group("train").Use(middleware.OperationRecord())
	{
		TrainRouter.POST("createTrain", v1.CreateTrain)   // 新建Train
		TrainRouter.DELETE("deleteTrain", v1.DeleteTrain) // 删除Train
		TrainRouter.DELETE("deleteTrainByIds", v1.DeleteTrainByIds) // 批量删除Train
		TrainRouter.PUT("updateTrain", v1.UpdateTrain)    // 更新Train
		TrainRouter.GET("findTrain", v1.FindTrain)        // 根据ID获取Train
		TrainRouter.GET("getTrainList", v1.GetTrainList)  // 获取Train列表
		TrainRouter.POST("addTrainLines", v1.AddTrainLines)  // 给动车设置路线
	}
}
